import React from 'react'
import {NavLink} from 'react-router-dom'
class NavTabLeft extends React.Component {
    constructor(props){
        super(props)
        this.state={
         LeftList:[{
                id: 1,
                text: 'Login',
                check: false,
                path:"index"
            }, {
                id: 2,
                text: 'First',
                check: false,
                path:"/"
            }, {
                id: 3,
                text: 'Second',
                check: false,
                path:"main"
            }]
        }
    }
    render(h) {
        const {children} =this.props;
        console.log(children);
        return (
            <ul>
                {this.state.LeftList.map((item,index)=>{
                    return (
                        /**
                         *  <li key={index}>{item.text}</li>
                         */
                        <NavLink className={`all cc ${this.props.activeIndex===index?"selectStyle":"normal"}`} to={item.path} key={index}>{item.text}
                        {this.props.activeIndex}
                        
                        <div>
                       序列:{index}
                        </div>   
                        </NavLink> 
                    )
                })}
                {
                    children.type=="solt-p"?<div>11111111</div>:<div>00000000</div>
                }
            </ul>
        )
    }
}
export default NavTabLeft;